<div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" aria-hidden="true" ng-click="cancel()">&times;</button>
    <h4 class="modal-title">版本变更</h4>
</div>

<div class="modal-body">
    <div class="row ">
        <div class="col-md-12 panel panel-default">

            <div class="form-group">

                <label class="col-sm-3 control-label text-right" >版本选择：</label>
                <div class="col-sm-7">
                    <select class="form-control" ng-options="ver for ver in datas" ng-model="SelectedVer" ></select>
                </div>
                <div class="col-sm-2">
                    <i class="fa fa-plus" style="line-height:32px;" ng-if="!TestVer"  ng-click="setVersionChoice(true)" ng-if="!NewVer"></i>
                    <i class="fa fa-remove" style="line-height:32px;" ng-if="TestVer"  ng-click="updateVersion()" ng-if="!NewVer"></i>
                </div>
                <div class="clearfix"></div>

            </div>
            <div class="form-group" ng-if="TestVer">

                <label class="col-sm-3 control-label text-right" >测试版本：</label>
                <div class="col-sm-7">
                    <select class="form-control" ng-options="ver for ver in datas" ng-model="TestVer" disabled="disabled"></select>
                </div>
                <div class="col-sm-2">
                    <i class="fa fa-remove" style="line-height:32px;" ng-click="removeVersion(TestVer)"></i>
                </div>
                <div class="clearfix"></div>

            </div>
            <div class="form-group" ng-if="NewVer&&!TestVer">

                <label class="col-sm-3 control-label text-right" >新增版本：</label>
                <div class="col-sm-7">
                    <select class="form-control" ng-options="ver for ver in datas" ng-model="VersionToAdd" ></select>
                </div>
                <div class="col-sm-2">
                    <i class="fa fa-minus" style="line-height:32px;" ng-click="setVersionChoice(false)"></i>
                    <i class="fa fa-check" style="margin-left:20px;line-height:32px;" ng-click="addVersion(VersionToAdd)"></i>
                </div>
                <div class="clearfix"></div>

            </div>
            <div class="form-group" ng-if="TestVer">
                <label class="col-sm-3 control-label text-right" >测试流量比例：</label>
                <div class="col-sm-7">
                    <div class="row">
                        <div class="col-sm-8">
                            <md-slider flex md-discrete type="number" class="md-primary" style="height: 32px;" ng-model="data.TestVerPer"  min="1" max="100" aria-label="rating" ng-init="data.TestVerPer = data.TestVerPer||50"  min="1" max="100" aria-label="rating">

                            </md-slider>
                        </div>
                        <div class="col-sm-4"> <md-input-container>
                            <input flex type="number" ng-model="data.TestVerPer" aria-label="red" aria-controls="red-slider">
                        </md-input-container></div>
                    </div>
                </div>
                <div class="col-sm-2">

                    <i class="fa fa-check" style="line-height:32px;" ng-click="setTestVerPer(data.TestVerPer)"></i>
                </div>
                <div class="clearfix"></div>



            </div>
            <label class="col-sm-3 control-label text-right">特别说明：</label>
            <div  class="col-sm-9">如果版本变更时，服务端口、环境变量、卷也发生了变化，请使用<a href="javascript:void(0)" ng-click="toServiceUpdate()">服务修改</a>。</div>
        </div>
    </div>
</div>

<div class="modal-footer">
    <button type="button" class="btn btn-white" data-dismiss="modal" ng-click="cancel()">取 消</button>
    <button type="button" class="btn btn-info" ng-click="ok()">确 定</button>
</div>
